package com.jtzc.aikf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jtzc.aikf.entity.DocumentDO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 文档数据访问层
 * @author wufagang
 */
@Mapper
public interface DocumentMapper extends BaseMapper<DocumentDO> {

    @Delete("DELETE FROM documents WHERE knowledge_base_id = #{knowledgeBaseId}")
    int deleteByKnowledgeBaseId(@Param("knowledgeBaseId") Integer knowledgeBaseId);
}
